// @ 516
// _(:з」∠)_
"use strict";

// config require path
require.config({
    baseUrl: "../../web/",
    // urlArgs: "v=" +  (new Date()).getTime(),
    map: {
        "*": { css: "lib/require/require.css@0.1.10" }
    },
    paths : {
        // custom tools
        "element": "script/tools/element/element@0.1.0",
        "property" : "script/tools/property@0.1.0",
        "formatData" : "script/tools/formatData@0.1.0",
        "formatTime" : "script/tools/formatTime@0.1.0",
        // map class
        "proj4": "lib/leaflet/extends/proj4/proj4",
        "pixi-2D": "lib/leaflet/extends/leaflet-PixiOverlay/pixi.min",
        "leaflet": "lib/leaflet/leaflet@1.3.4",
        "leaflet-src": "lib/leaflet/leaflet-src@1.3.4",
        "iclient9-leaflet": "lib/leaflet/iclient9-leaflet",
        "leaflet-wmts": "lib/leaflet/extends/leaflet-wmts/leaflet-tilelayer-wmts-src",
        "leaflet-heat": "lib/leaflet/extends/leaflet-heat/leaflet-heat",
        "leaflet-proj4": "lib/leaflet/extends/proj4/proj4leaflet",
        "leaflet-PixiOverlay": "lib/leaflet/extends/leaflet-PixiOverlay/L.PixiOverlay",
        "leaflet-MarkerContainer": "lib/leaflet/extends/leaflet-PixiOverlay/MarkerContainer",
        "leaflet-bezier-easing": "lib/leaflet/extends/leaflet-PixiOverlay/bezier-easing",
        // custom map class
        "leafletCustom": "script/map/leaflet/leaflet@0.1.0",
        "leafletMultiFacet": "script/extend/multiFacet",
        "leafletGridHeatMap": "script/extend/gridHeatMap",
        "leafletCustomTools": "script/map/leaflet/leaflet_tools@0.1.0",
        // antv.G2 class
        "echarts": "lib/echarts/echarts.min",
        "antv.G2": "lib/antv.G2/g2@3.2.8",
        // layDate class
        "layDate": "lib/layDate/laydate@5.0.9",
        // handson table class
        "Handsontable": "lib/handsontable/handsontable.full.min",
        // custom init class
        "request": "script/extend/request",
        "colorMatch": "script/extend/colorMatching/colorMatching",
        "timeLine": "script/extend/timeLine/timeLine",
        "loading": "script/extend/loading/loading",
        "legend": "script/extend/legend/legend",
        "title": "script/extend/title/title",
        "popup": "script/extend/popup/popup",
        "table": "script/extend/table/table",
        "chart": "script/extend/chart/chart",
        // view class
        "leftMain": "script/views/leftView/leftMain",
        "left-dis": "script/views/leftView/disaster",
        "left-meteor": "script/views/leftView/meteorological",
        "left-station": "script/views/leftView/farmlandStation",
        "left-systemSet": "script/views/leftView/systemSetting",
        "rightTools": "script/views/rightView/rightTools",
        "rightPanel": "script/views/rightView/rightPanel",
        "disDetilas": "script/views/rightView/disDetilas/disDetilas",
        "weatherStation": "script/views/rightView/weatherStation",

        "jQuery": "https://code.jquery.com/jquery-3.3.1.min",
    },
    shim: {
        "element": { deps: [ "css!../web/script/tools/element/element@0.1.0.css" ] },
        "property": { deps: [ "css!lib/font-awesome/css/font-awesome@4.7.0.css" ] },

        "leaflet-src": { deps: [ "css!lib/leaflet/leaflet@1.3.4.css" ] },
        "leafletCustom": { deps: [ "css!../web/css/view/map.css" ] },
        "leafletCustomTools": { deps: [ "css!../web/script/map/leaflet/leaflet_tools.css" ] },

        "Handsontable": { deps: [ "css!lib/handsontable/handsontable.css" ] },

        "timeLine": { deps: [ "css!../web/script/extend/timeLine/timeLine.css" ] },
        "loading":{ deps: [ "css!../web/script/extend/loading/loading.css" ] },
        "legend": { deps: [ "css!../web/script/extend/legend/legend.css" ] },
        "title": { deps: [ "css!../web/script/extend/title/title.css" ] },
        "popup": { deps: [ "css!../web/script/extend/popup/popup.css" ] },
        "table": { deps: [ "css!../web/script/extend/table/table.css" ] },

        "leftMain": { deps: [
            "css!../web/css/view/view.css",
            "css!../web/script/views/leftView/leftMain.css",
        ]},
        "left-dis": { deps: [ "css!../web/script/views/leftView/disaster.css" ] },
        "left-meteor": { deps: [ "css!../web/script/views/leftView/meteorological.css" ] },
        "left-station": { deps: [ "css!../web/script/views/leftView/farmlandStation.css" ] },
        "left-systemSet": { deps: [ "css!../web/script/views/leftView/systemSetting.css" ] },

        "rightPanel": { deps: [ "css!../web/script/views/rightView/rightPanel.css" ]},
        "disDetilas": { deps: [ "css!../web/script/views/rightView/disDetilas/disDetilas.css" ]},
        "weatherStation": { deps: [ "css!../web/script/views/rightView/weatherStation.css" ]},
    }
});

// config expose
const Path = window.location.href.split("/html")[0],
    NetWorkPath = "http://103.254.67.177:8030/medwas_data";
    // NetWorkPath = "http://10.230.43.215:8030/medwas_data";    

// init page
require([
    "property", "formatData", "formatTime",
    "proj4", "table", "chart", "element", "request",
    "title", "popup", "legend", "loading", "timeLine",
    "leaflet", "leaflet-src", "pixi-2D", "jQuery"
], function() {
    require([
        'colorMatch',
        'leaflet-PixiOverlay',
        'leaflet-MarkerContainer',
        'leaflet-bezier-easing',
        'leafletCustomTools'
    ], function() {
        require([
            "leftMain",
            "rightPanel"
        ]);
    });
});